<template>
  <div>
<el-row>
  <el-col :span="6">
    <h1>请完善订单资料</h1>
    收货人：<input type="text" v-model="order.receiver"><br>
    送货地址：<input type="text" v-model="order.address"><br>
    收货人电话：<input type="text" v-model="order.phone"><br>
    <el-button  type="danger" @click="add()">提交订单</el-button>

  </el-col>
</el-row>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      order:{}
    }
  }, methods: {
    add(){
      axios.get("/project/order/add",{params:this.order}).then(resp=>{
        if (resp.data=="ok"){
          this.$router.push("/shopping/success");
        }
      })
    }
  }
}
</script>

<style scoped>
input{
  margin: 25px 0;
}
</style>